package com.ssk.sh.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.time.OffsetDateTime;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author ssk
 * @since 2025-06-12
 */
@Getter
@Setter
@TableName("workspaces")
@Schema(name = "Workspaces", description = "")
public class Workspaces implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("owner_id")
    private Long ownerId;

    //    @TableField(value = "created_at",typeHandler = com.ssk.sh.core.enums.handler.LocalDateTimeTypeHandler.class)
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private OffsetDateTime createdAt = OffsetDateTime.now();

    public static final String ID = "id";

    public static final String NAME = "name";

    public static final String OWNER_ID = "owner_id";

    public static final String CREATED_AT = "created_at";
}
